/*
 * @Author: 赵克强 huohuo625@163.com
 * @Date: 2023-10-25 10:09:50
 * @LastEditors: 赵克强 huohuo625@163.com
 * @LastEditTime: 2024-07-23 10:18:35
 * @FilePath: \hy-ui\src\api\app\electronicForms.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 查询表单模型-电子表单-基础信息列表
export function listAppInfo(query) {
    return request({
      url: '/app/appFormModel/list',
      method: 'get',
      params: query
    })
  }

  // 新增表单模型-电子表单-基础信息
export function appFormModel(data) {
    return request({
      url: '/app/appFormModel',
      method: 'post',
      data: data
    })
  }
// 获取表单模型-电子表单-基础信息详细信息
export function listAppInfoDetail(id) {
  return request({
    url:`/app/appFormModel/${id}`,
    method: 'get',
  })
}
// 修改表单模型-电子表单-基础信息 
export function appFormModelUpdate(params) {
  return request({
    url:`/app/appFormModel`,
    method: 'put',
    data: params
  })
}
//删除表单模型-电子表单-基础信息
export function listAppInfoDelete(id) {
  return request({
    url:`/app/appFormModel/${id}`,
    method: 'delete',
  })
}
//启用
export function appFormModelActive(id) {
  return request({
    url:`/app/appFormModel/active/${id}`,
    method: 'get',
  })
}

//停用
export function appFormModelSuspended(id) {
  return request({
    url:`/app/appFormModel/suspended/${id}`,
    method: 'get',
  })
}
//检入
export function appFormModelCheckin(id) {
  return request({
    url:`/app/appFormModel/checkin/${id}`,
    method: 'get',
  })
}
//检出
export function appFormModelcheckout(id) {
  return request({
    url:`/app/appFormModel/checkout/${id}`,
    method: 'get',
  })
}
// 获取流程表单详细信息
export function workflowForm(formId) {
  return request({
    url:`/workflow/form/${formId}`,
    method: 'get',
  })
}

// 修改流程表单

export function workflowFormUpdate(params) {
  return request({
    url:`/workflow/form`,
    method: 'put',
    data: params
  })
}

export function saveNodeApprover(params) {
  return request({
    url:`/app/processBottomDisplay`,
    method: 'post',
    data: params
  })
}


export function getNodeApprover(params) {
  return request({
    url:`/app/processBottomDisplay/list`,
    method: 'get',
    params: params
  })
}
export function saveNodeApproverProcess(params) {
  return request({
    url:`/app/processBottomDisplay/editR`,
    method: 'post',
    data: params
  })
}




